libxl, hotplug/Linux: default to phy backend for raw format file, take 2
authorWei Liu <wei.liu2@citrix.com>
Thu, 8 Jan 2015 13:46:53 +0000 (13:46 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 12 Jan 2015 16:07:35 +0000 (16:07 +0000)
commita0a2dc45f1bdbabc661332e8530c480a77391d85
tree57e46e7fe3a5388a3a93e9bbd28fa81db692725d
parentc69ec40e260d54f5e0915fd59c67330efb442437
libxl, hotplug/Linux: default to phy backend for raw format file, take 2

This patch resurrects 11a63a166. The previous patch had a bug that
wrong "physical-device" was written to xenstore causing block script
execution fail. This patch fixes that problem.

Following configurations have been tested:

1. Raw file and PV
2. Raw file and HVM
3. Block device and PV
4. Block device and HVM

Creation / destruction / local migration all worked.

Original commit message from 11a63a166:

Modify libxl and hotplug script to allow raw format file to use phy
backend.

The block script now tests the path and determine the actual type of
file (block device or regular file) then use the actual type to
determine which branch to run.

With these changes, plus the current ordering of backend preference (phy
> qdisk > tap), we will use phy backend for raw format file by default.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/hotplug/Linux/block
tools/libxl/libxl.c
tools/libxl/libxl_device.c
tools/libxl/libxl_linux.c